# This file is automatically copied into RAILS_ROOT/initializers

require "smtp_tls"

=begin
# config/smtp_gmail.yml
--- 
  :address: "smtp.gmail.com"
  :port: 587
  :authentication: :plain
  :enable_starttls_auto: true
  :user_name: "liangwenke8@gmail.com"
  :password: 15913185305
=end
#config_file = "#{RAILS_ROOT}/config/smtp_gmail.yml"
#raise "Sorry, you must have #{config_file}" unless File.exists?(config_file)

#mailer_options = YAML.load_file(config_file) 

#ActionMailer::Base.smtp_settings = mailer_options
ActionMailer::Base.delivery_method = :smtp  
ActionMailer::Base.default_charset = "utf-8"
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.perform_deliveries = true

ActionMailer::Base.smtp_settings = {
  :address => "smtp.gmail.com",
  :port => 587,
  :authentication => :plain,
  :user_name => "liangwenke8@gmail.com",
  :password => "15913185305",
  :enable_starttls_auto => true
}
